package com.naxiang.cn.xinvideo;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.naxiang.cn.utils.CompletedView;

/**
 * 作者: 赵航
 * 创建时间: 2018/7/14 14:46
 * 描述:
 */
public class NativeVideo extends RelativeLayout {
    private SurfaceView mNativeSurface;

    private ImageButton mCancel;
    private ImageButton mSure;
    private ImageView mChengNativeVideo;
    private ImageView mOpenNativeLight;
    private ImageView mBiginNativeVideo;
    private CompletedView mCompletedView;



    public NativeVideo(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView();
    }

    //初始化数据
    private void initView() {
        LayoutInflater inflater = (LayoutInflater) this.getContext().getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
        RelativeLayout layout = (RelativeLayout) inflater.inflate(R.layout.mo_xinvideo_native_layout, this);

        mNativeSurface = (SurfaceView) layout.findViewById(R.id.nativesurface);
        mChengNativeVideo = (ImageView) layout.findViewById(R.id.chengenativevideo);
        mOpenNativeLight = (ImageView) layout.findViewById(R.id.opennativelight);
        mBiginNativeVideo = (ImageView) layout.findViewById(R.id.biginnativevideo);
        mCancel = (ImageButton) layout.findViewById(R.id.cancel);
        mSure = (ImageButton) layout.findViewById(R.id.sure);
        mCompletedView = (CompletedView) layout.findViewById(R.id.completedview);
    }
    public SurfaceView getNativeSurface() {
        return mNativeSurface;
    }
    public ImageButton getCancel() {
        return mCancel;
    }
    public ImageButton getSure() {
        return mSure;
    }
    public ImageView getChengNativeVideo() {
        return mChengNativeVideo;
    }
    public ImageView getOpenNativeLight() {
        return mOpenNativeLight;
    }
    public ImageView getBiginNativeVideo() {
        return mBiginNativeVideo;
    }
    public NativeVideo(Context context) {
        super(context, null);
        initView();
    }
    public CompletedView getCompletedView() {
        return mCompletedView;
    }
}
